package com.tsinghuabigdata.edu.ddmath.opencv;

import com.tsinghuabigdata.edu.ddmath.util.AppLog;

/**
 * Created by Administrator on 2017/3/11.
 */
public class OpenCVHelper {
    static {
        try{
            System.loadLibrary("OpenCV");
        }catch (Exception e){
            AppLog.d("dfdfdfdfdfdf e = "+e.toString() );
        }
    }

    public static native int[] gray(int[] buf, int w, int h);
    public static native int testdata();
    public static native int detect(int[] buf, int w, int h);
    public static native int detectFile(String buf);

    public static native int detectBuffer(long srcaddr, long dstaddr);
    //参数都是相对长宽的比率，放大1000倍
    public static native int detectBitmap( Object object, int x, int y, int width, int height );
    public static native boolean getDetectImage( String filename );

}
